<?php
namespace App\Repos;
use App\Models\Admin;
use App\Models\Role;

class AdminRepo
{
	public static function  getList($where=[],$num=10)
	{	   
	  	$list = Admin::where($where)->paginate($num); 
	  	return $list;     
	}

	public static function create($data)
	{
		$flag = Admin::create($data);
		return $flag;
	}

	public static function destroy($id)
	{
		$flag = Admin::destroy($id);
		return $flag;
	}

	public static function find($id)
	{
		return Admin::find($id);
	} 

	public static function update($id,$data)
	{
		return Admin::where(['id'=>$id])->update($data);
	}



	
	

	
	
	
}